// import Router from 'vue-router'
import components from '@/views/pages.js'



var routes=[];
for (const i in components ) {
  if (components.hasOwnProperty(i)) {
    const element = components[i];
    routes.push({
      path: i=='alert'?'/':('/'+i),
      name: i,
      component: element
    })
  }
}

// Vue.prototype.__getSource=function(tag,fn){
//   $.ajax({
//     url:"http://localhost:8888/"+tag,
//     success(res){
//       fn(res)
//     }
//   })
// }

Vue.use(Router)

export default new Router({
  routes: routes
})






